package com.mf.utils;

import com.mf.Enum.EnumNextProcess;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: lmf
 * @Create: 2025/4/21 13:43
 * @module
 */
public class UtilEnumNextProcess {
    private final static Map<String, Integer> map = new HashMap<>();
    private final static Map<Integer, String> map2 = new HashMap<>();

    static {
        EnumNextProcess[] enumNextProcesses = EnumNextProcess.values();
        for (EnumNextProcess enumNextProcess : enumNextProcesses) {
            map.put(enumNextProcess.getMessage(), enumNextProcess.getCode());
            map2.put(enumNextProcess.getCode(), enumNextProcess.getMessage());
        }
    }

    public static Integer getNextProcess(String nextProcess) {
        return map.get(nextProcess);
    }

    public static String getNextProcess(Integer nextProcess) {
        return map2.get(nextProcess);
    }


}
